package com.zhou.listener;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
    private ListView list;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        list = findViewById(R.id.list);
        ArrayList<MyBean> arr = new ArrayList<>();
        arr.add(new MyBean(0,"图片1","http://shouji.360tpcdn.com/190304/0a6e3aae1d87f30030c0e26c931e6ef4/com.baidu.searchbox_47449344.apk"));
        arr.add(new MyBean(1,"图片2","https://dl.google.com/dl/android/studio/ide-zips/3.0.1.0/android-studio-ide-171.4443003-windows.zip"));
        arr.add(new MyBean(2,"图片3","https://dl.google.com/dl/android/studio/ide-zips/3.0.1.0/android-studio-ide-171.4443003-windows32.zip"));
        arr.add(new MyBean(3,"图片4","ssss"));
        arr.add(new MyBean(4,"图片5","ssss"));
        arr.add(new MyBean(5,"图片6","ssss"));
        arr.add(new MyBean(6,"图片7","ssss"));
        arr.add(new MyBean(7,"图片8","ssss"));
        arr.add(new MyBean(8,"图片9","ssss"));
        arr.add(new MyBean(9,"图片10","ssss"));
        arr.add(new MyBean(10,"图片11","ssss"));
        arr.add(new MyBean(11,"图片12","ssss"));
        arr.add(new MyBean(12,"图片13","ssss"));
        arr.add(new MyBean(13,"图片14","https://dl.google.com/dl/android/studio/install/3.0.1.0/android-studio-ide-171.4443003-mac.dmg"));
        arr.add(new MyBean(14,"图片15","https://dl.google.com/dl/android/studio/ide-zips/3.0.1.0/android-studio-ide-171.4443003-linux.zip"));
        arr.add(new MyBean(15,"图片16","http://shouji.360tpcdn.com/190304/0a6e3aae1d87f30030c0e26c931e6ef4/com.baidu.searchbox_47449344.apk"));
        arr.add(new MyBean(16,"图片17","https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip"));
        list.setAdapter(new MyAdapter(this,arr));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.i("---->","onDestory");
    }
}
